const APP = require('../views/admin/common/ttxs');

const qnUrl = require('../views/admin/filters/qn-url');
const qnImg = require('../views/admin/filters/qn-img');

describe('过滤器', () => {
    it('七牛 url', () => {
        qnUrl('key/name.jpg')
        .should.to.equal(APP.assetsBaseURL + 'key/name.jpg');
    });

    it('七牛 图片', () => {
        qnImg('key/name.jpg', 200, 300)
        .should.to.equal(APP.assetsBaseURL + 'key/name.jpg?x-oss-process=image/resize,w_200/h/300');
    });
});
